package com.kgc.activiti.remote;

import java.util.Map;
import com.kgc.activiti.util.ResponseMsg;
import com.kgc.activiti.pojo.WorkFlow;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

public interface WorkFlowRemote {

    //导出工作流

    @RequestMapping("exportWorkFlow")
    @ResponseBody
    ResponseMsg exportWorkFlow(@RequestBody WorkFlow workFlow,@RequestParam("xml") String xml);

    @RequestMapping("getWorkFlowList")
     ResponseMsg getWorkFlowList(@RequestBody Map<String, Object> paramMap);

    @RequestMapping("showWorkFlow")
     ResponseMsg showWorkFlow(@RequestParam("url") String url);

    @RequestMapping("editWorkFlow")
     ResponseMsg editWorkFlow(@RequestBody WorkFlow workFlow,@RequestParam("xml") String xml);

    //@RequestParam("code") String code,@RequestParam("type") Integer type
    @RequestMapping("startProcess")
    ResponseMsg startProcess(@RequestBody Map<String,Object> params);

    @RequestMapping("selectWorkFlowByType")
    ResponseMsg selectWorkFlowByType(@RequestParam("type") Integer type);

    //@RequestParam("code") String code
    @RequestMapping("competeTask")
    ResponseMsg competeTask(@RequestBody Map<String,Object> params);


    @RequestMapping("checkCodeExitOrNull")
    ResponseMsg checkCodeExit(@RequestParam("code") String code);

    @RequestMapping("checkTypeExit")
    ResponseMsg checkTypeExit(@RequestParam("type") Integer type);

    @RequestMapping("checkNameExit")
    ResponseMsg checkNameExit(@RequestParam("name") String name);

    @RequestMapping("deployWorkFlow")
    ResponseMsg deployWorkFlow(@RequestParam("url") String url);

    @RequestMapping("reSubmit")
    ResponseMsg reSubmit(@RequestBody Map<String,Object> params);

}
